<script setup lang="ts">
import { onMounted } from 'vue';

import * as echarts from 'echarts';

// 基于准备好的dom，初始化echarts实例
onMounted(()=>{
let myChart = echarts.init(document.getElementById('ming'));
// 绘制图表
myChart.setOption({
  title: {
    text: 'ECharts 入门示例',
    textStyle:{
      color:'white'
    }
  },
  tooltip: {},
  xAxis: {
    data: ['衬衫', '羊毛衫', '雪纺衫', '裤子', '高跟鞋', '袜子']
  },
  yAxis: {},
  series: [
    {
      name: '销量',
      type: 'line',
      data: [5, 20, 36, 10, 10, 20]
    }
  ]
});
window.onresize=()=>{
  myChart.resize();
}
})
</script>


<template>
  <div class="box">
     <div id="ming">

    </div>
  </div>
</template>

<style scoped>
.box{
  background-image: url(../images/kuang.png);
  background-size: 100% 100%;
  background-repeat: no-repeat;
}
#ming{
  height: 100%;
}
</style>